package com.abaaba.project2.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
public class Footprint {
    private Integer id;

    private Integer userId;

    private Integer goodsId;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date addTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    private Boolean deleted;

    public Footprint() {
    }

    public Footprint(Integer id, Integer userId, Integer goodsId, Date addTime, Date updateTime, Boolean deleted) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        this.id = id;
        this.userId = userId;
        this.goodsId = goodsId;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.deleted = deleted;
    }
}